

#ifndef SNL_FILEWRITER_H

#define SNL_FILEWRITER_H


#include<string>
#include<fstream>
#include<iostream>
using namespace std;

enum WRITERTYPE
{
	console =0,
	file =1,
	all =2,
	none =-1
};


class FileWriter
{
public:

	//constructor
	FileWriter(WRITERTYPE wt,string fn);

	//append string to the file or the buffer stream
	void appendTo(string str);


private:


	bool m_writeToConsole(string str);
	bool m_writeToFile(string str);

	WRITERTYPE writertype;
	ofstream outfile;
	string fileName;
};

#endif

